// 积分管理相关
import request from "@/utils/request";

// 积分规则查询
export function getRulesAPI(data) {
  return request({
    url: "/tIntegralConfig/getOne",
    method: "post",
    data: data,
  });
}

// 积分规则更新
export function saveRulesAPI(data) {
  return request({
    url: "/tIntegralConfig/saveAndUpdate",
    method: "post",
    data: data,
  });
}

// 学员积分列表-展示所有学员的积分情况
export function getAllPointListAPI(data) {
  return request({
    url: "/tIntegral/list",
    method: "get",
    params: data,
  });
}

// 为某个学员手动发放/扣减积分
export function savePointsAPI(data) {
  return request({
    url: "/tIntegral/save",
    method: "post",
    data: data,
  });
}

// 某个学员积分发放列表
export function getPointListByPerAPI(data) {
  return request({
    url: "/tIntegral/listSecond",
    method: "get",
    params: data,
  });
}

// 某个学员积分发放统计-剩余积分、本月积分
export function getPointStatisticByPerAPI(data) {
  return request({
    url: "/tIntegral/count",
    method: "post",
    data: data,
  });
}
